package org.example.curriculum_design_6_16.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName evaluation_record
 */
@TableName(value ="evaluation_record")
@Data
public class EvaluationRecord implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private String studentId;

    /**
     * 
     */
    private String evaluatorId;

    /**
     * 
     */
    private String evaluationType;

    /**
     * 
     */
    private Double score;

    /**
     * 
     */
    private String comments;

    /**
     * 
     */
    private Date evaluationDate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EvaluationRecord other = (EvaluationRecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getEvaluatorId() == null ? other.getEvaluatorId() == null : this.getEvaluatorId().equals(other.getEvaluatorId()))
            && (this.getEvaluationType() == null ? other.getEvaluationType() == null : this.getEvaluationType().equals(other.getEvaluationType()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
            && (this.getComments() == null ? other.getComments() == null : this.getComments().equals(other.getComments()))
            && (this.getEvaluationDate() == null ? other.getEvaluationDate() == null : this.getEvaluationDate().equals(other.getEvaluationDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getEvaluatorId() == null) ? 0 : getEvaluatorId().hashCode());
        result = prime * result + ((getEvaluationType() == null) ? 0 : getEvaluationType().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        result = prime * result + ((getComments() == null) ? 0 : getComments().hashCode());
        result = prime * result + ((getEvaluationDate() == null) ? 0 : getEvaluationDate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", studentId=").append(studentId);
        sb.append(", evaluatorId=").append(evaluatorId);
        sb.append(", evaluationType=").append(evaluationType);
        sb.append(", score=").append(score);
        sb.append(", comments=").append(comments);
        sb.append(", evaluationDate=").append(evaluationDate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}